package com.pig4cloud.pigx.contract.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import com.pig4cloud.pigx.contract.annotation.SetScaleMainCurrency;
import com.pig4cloud.pigx.contract.annotation.SetScaleTokenCurrency;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 24小时数据统计 websocket
 * @author
 */
@Data
public class Contract24hTradeWebsocketVO implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 外币名称
	 */
	private String tokenCurName;

	/**
	 * 涨跌幅
	 */
	@SetScaleMainCurrency(scale = 2)
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal riseAndFallRange;

	/**
	 * 最新价
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal lastPrice;

	/**
	 * 24h 成交额
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal sumPrice;

	/**
	 * 24h 最高价
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal maxPrice;

	/**
	 * 24h 最低价
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal minPrice;

	/**
	 * 24h 成交量
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal sumNum;

	/**
	 * 标记价
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal markPrice;

	/**
	 * 资金费率
	 */
	@SetScaleMainCurrency(scale = 2)
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal fundingRate;

}
